package com.luoye.lj.wstool.common;

/**
 * Created with IntelliJ IDEA.
 * User: Dave Liu
 * Date: 15-10-10
 * Time: 下午5:18
 * To change this template use File | Settings | File Templates.
 */
public class ProjectInfoUtils {
    //获取projectArtifactIdSimple
    public static String getProjectArtifactIdSimple(String projectArtifactId){
        String projectArtifactIdSimple=projectArtifactId;
        if(projectArtifactIdSimple.endsWith("-all")){
            projectArtifactIdSimple=projectArtifactIdSimple.substring(0,projectArtifactIdSimple.indexOf("-all"));
        }
        return projectArtifactIdSimple;
    }
    //获取子项目前缀
    public static String getSubPojectPrefix(String projectArtifactId,String subProjectName){
        String subProjectPrefix="";
        String projectArtifactIdSimple=getProjectArtifactIdSimple(projectArtifactId);
        subProjectPrefix=projectArtifactIdSimple+"-"+subProjectName;

        return subProjectPrefix;
    }
}
